const SYSTEM_INFO = uni.getSystemInfoSync();
export const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 0; //状态栏高度
// 微信小程序胶囊高度和top
export const getTitleBarHeight = () => {
	if (uni.getMenuButtonBoundingClientRect) {
		const { top, height } = uni.getMenuButtonBoundingClientRect()
		const titleBarHeight = height + (top - getStatusBarHeight()) * 2
		return titleBarHeight
	} else {
		return 40
	}
}

// navabr整体的高度
export const getNavbarHeight = () => getStatusBarHeight() + getTitleBarHeight()